

package com.timber.util;

import pv.jfcx.*;

/**
 *	basic JPV table number editor
 *	sets 'k' as 1K and 'm' as 1MM multiplier
 */
public class SLNumberEditor extends PVTableEditor
{

  /**
   *	constructor takes JPV constant as editor, and numeric, type
   */
  public SLNumberEditor( int style )
  {
    super( style );
    JPVNumeric c = (JPVNumeric)m_comp;
    c.set1000Multiplier("k");
    c.set1000000Multiplier("m");
    c.setSelectionKillByMouse(false);
    setSelectionStyle( 2 );
    setClicksToStart( 0 );
  }

  /**
   *	double with ploating point enabled when param is true
   */
  public SLNumberEditor( boolean fp )
  {
    this( JPVTable.DOUBLE );
    JPVNumeric c = (JPVNumeric)m_comp;

    c.setEnableFloatPoint(fp);
    //    c.setSelectionOnFocus( 1 );
  }

  /**
   *	default constructor with LONG as type
   */
  public SLNumberEditor()
  {
    this( JPVTable.LONG );
    JPVNumeric c = (JPVNumeric)m_comp;
    c.setSelectionOnFocus( 1 );

  }

}
